# -*- coding: utf-8 -*-
 ##############################################
 ##                                            ##
 ##            Controller for Compras           ##
 ##              for Basiq Empresa              ##
 ##                                             ##
 ##              from Basiq Series              ##
 ##            by Críptidos Digitales           ##
 ##                 GPL (c)2008                 ##
  ##                                            ##
    ##############################################

"""
"""

from decimal import Decimal

from baseController import *

#~ session.plugins['purchases'] =

class PurchasesSession: pass


import model

def initPurchasesSession():
    print "compras.controller.initPurchaseSession()"
    PurchasesSession.generalTax = Decimal(model.getAttribute(grupo=u'sistema', nombre=u'impuestoGeneral')['valor'])
    PurchasesSession.generalTaxFactor = (PurchasesSession.generalTax + Decimal('100')) / Decimal('100')


import igu

def getPurchaseForm(self, **kwds):
    print "compras.controller.getPurchaseForm()"
    form = igu.Forma(self, **kwds)
    return form



if __name__ == "__main__":
    pass

